package com.example.shop_2210.database

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.example.base.entity.HistoryEntity

/**
 * 数据库----DAO
 */
@Dao
interface HistoryDao {
    //保存历史记录
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insert(historyEntity: HistoryEntity)

    //查询历史记录
    @Query("select * from history")
    fun query():List<HistoryEntity>
}